package util;

import java.util.HashMap;
import java.util.Map;

public class Constants {
    private static final String BaseUrl = "https://gitee.com/allen056/mvp_generate_plugin/raw/master/src/Template";
    //baselibrary源码
    public static final String BaseLibraryCode = BaseUrl + "/code/baselibrary.zip";

    //MVP
    public static final String TemplateActivity = BaseUrl + "/TemplateActivity.txt";
    public static final String TemplateActivityDataBinding = BaseUrl + "/TemplateActivityDataBinding.txt";
    public static final String TemplateContract = BaseUrl + "/TemplateContract.txt";
    public static final String TemplateFragment = BaseUrl + "/TemplateFragment.txt";
    public static final String TemplateFragmentLayout = BaseUrl + "/TemplateFragmentLayout.txt";
    public static final String TemplateLayout = BaseUrl + "/TemplateLayout.txt";
    public static final String TemplateModel = BaseUrl + "/TemplateModel.txt";
    public static final String TemplatePresenter = BaseUrl + "/TemplatePresenter.txt";

    //------------------adapter----------------
    public static final String recycler_item_layout = BaseUrl + "/adapter/recycler_item_layout.txt";
    public static final String swipe_recycler_item_layout = BaseUrl + "/adapter/swipe_recycler_item_layout.txt";
    public static final String TemplateRecyclerAdapter = BaseUrl + "/adapter/TemplateRecyclerAdapter.txt";
    public static final String TemplateSwipeRecyclerAdapter = BaseUrl + "/adapter/TemplateSwipeRecyclerAdapter.txt";

    //------------------dialog------------------
    public static final String dialog_layout = BaseUrl + "/dialog/dialog_layout.txt";
    public static final String TemplateDialog = BaseUrl + "/dialog/TemplateDialog.txt";

    //------------------init---------------------
    public static final String activity_init = BaseUrl + "/init/activity_init.txt";
    public static final String activity_main = BaseUrl + "/init/activity_main.txt";
    public static final String AppDirs = BaseUrl + "/init/AppDirs.txt";
    public static final String dependencies = BaseUrl + "/init/dependencies.txt";
    public static final String dependencies1 = BaseUrl + "/init/dependencies1.txt";
    public static final String appBuildGradle = BaseUrl + "/init/appBuildGradle.txt";
    public static final String GlobalService = BaseUrl + "/init/GlobalService.txt";
    public static final String GlobalVars = BaseUrl + "/init/GlobalVars.txt";
    public static final String InitActivity = BaseUrl + "/init/InitActivity.txt";
    public static final String InitCallBack = BaseUrl + "/init/InitCallBack.txt";
    public static final String LoadServiceAsyncTask = BaseUrl + "/init/LoadServiceAsyncTask.txt";
    public static final String MainActivity = BaseUrl + "/init/MainActivity.txt";
    public static final String MainApplication = BaseUrl + "/init/MainApplication.txt";
    public static final String MainContract = BaseUrl + "/init/MainContract.txt";
    public static final String MainModel = BaseUrl + "/init/MainModel.txt";
    public static final String MainPresenter = BaseUrl + "/init/MainPresenter.txt";
    public static final String styles = BaseUrl + "/init/styles.xml";
    public static final String WeakAsyncTask = BaseUrl + "/init/WeakAsyncTask.txt";

    //----------------view-----------------------
    public static final String TemplateView = BaseUrl + "/view/TemplateView.txt";
    public static final String view_layout = BaseUrl + "/view/view_layout.txt";

    private static Map<String, String> map = new HashMap<>();

    static {
        map.put("TemplateActivity", TemplateActivity);
        map.put("TemplateActivityDataBinding", TemplateActivityDataBinding);
        map.put("TemplateContract", TemplateContract);
        map.put("TemplateFragment", TemplateFragment);
        map.put("TemplateFragmentLayout", TemplateFragmentLayout);
        map.put("TemplateLayout", TemplateLayout);
        map.put("TemplateModel", TemplateModel);
        map.put("TemplatePresenter", TemplatePresenter);
        //adapter
        map.put("recycler_item_layout", recycler_item_layout);
        map.put("swipe_recycler_item_layout", swipe_recycler_item_layout);
        map.put("TemplateRecyclerAdapter", TemplateRecyclerAdapter);
        map.put("TemplateSwipeRecyclerAdapter", TemplateSwipeRecyclerAdapter);
        //dialog
        map.put("dialog_layout", dialog_layout);
        map.put("TemplateDialog", TemplateDialog);
        //init
        map.put("activity_init", activity_init);
        map.put("activity_main", activity_main);
        map.put("AppDirs", AppDirs);
        map.put("GlobalService", GlobalService);
        map.put("GlobalVars", GlobalVars);
        map.put("InitActivity", InitActivity);
        map.put("InitCallBack", InitCallBack);
        map.put("LoadServiceAsyncTask", LoadServiceAsyncTask);
        map.put("MainActivity", MainActivity);
        map.put("MainApplication", MainApplication);
        map.put("MainContract", MainContract);
        map.put("MainModel", MainModel);
        map.put("MainPresenter", MainPresenter);
        map.put("styles", styles);
        map.put("WeakAsyncTask", WeakAsyncTask);
        //view
        map.put("TemplateView", TemplateView);
        map.put("view_layout", view_layout);
    }

    public static String get(String key) {
        return map.get(key);
    }

}
